Package edu.uky.ai.csp
Class Solver
java.lang.Object
edu.uky.ai.csp.Solver
public class Solver
extends java.lang.Object
Provides the constraint propagation and search algorithms used to solve
constraint satisfaction problems.
- Author:
- Your Name
-
Constructor Summary
Constructors Constructor Description Solver() -
Method Summary
-
Constructor Details
-
Solver
public Solver()
-
-
Method Details
-
propagate
Given a partial solution, this method propagates the constraints of a problem to achieve 2-consistency.
This method should call
propagate(Solution, Queue)to do the actual work. This method simply sets up the initial queue of constraints (which is all of the problem's binary constraints).- Parameters:
solution- a partial solution whose variable domains should be modified- Returns:
- false if the problem is found to be unsolvable, true otherwise
-
solve
Solves a constraint satisfaction problem via backtracking search.- Parameters:
solution- a partial solution to refine- Returns:
- a complete solution, or null if the problem cannot be solved
-